<link type="text/css" rel="stylesheet" href="<?php echo base_url(CSS_PUBLIC);?>/pages.css" />
<link type="text/css" rel="stylesheet" href="<?php echo base_url(CSS_PUBLIC);?>/news.css" />
<div id="ja-botsl-1" class="wrap">
    <div class="main">
        <div class="main-inner1 clearfix" style="border: none;">
            <div class="cols cols_left">
                <?php echo news_category_block(); ?>
            </div>
            <div class="cols cols_right">
                <div class="right_header">
                    <div><?php echo isset($category_info) ? @$category_info->title : 'Tin tức mới';?></div>
                    <div>
                        <div class="ontime"></div>
                        <ul class="actions">
                            <li class="email-icon">
                                <a href="#" title="Email"><img src="<?php echo base_url(IMG_PUBLIC);?>/emailButton.png" alt="Email"></a>
                            </li>
                            <li class="print-icon">
                                <a href="#" rel="nofollow"><img src="<?php echo base_url(IMG_PUBLIC);?>/printButton.png" alt="In"></a>
                            </li>
                            <li>
                                <a href="#" rel="nofollow"><img src="<?php echo base_url(IMG_PUBLIC);?>/pdf_button.png" alt="PDF."></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="right_content news">
                    <ul>
                        <?php
                            foreach($result as $key => $value):
                            $url = base_url('tin-tuc/'.url_friendly($value->title).'-d'.$value->news_id.'.html');
                        ?>
                            <li class="item <?php echo $key + 1 == count($result) ? 'last' : '';?>">
                                <div class="image"><a href="<?php echo $url;?>"><img onerror="ImgError(this);" width="150" height="120" src="<?php echo base_url('uploads/news/'.$value->news_id.'/'.md5($value->news_id).'.jpg');?>"/></a></div>
                                <div class="title"><a href="<?php echo $url;?>"><?php echo $value->title;?></a></div>
                                <div class="datetime">Đăng lúc: <?php echo date('d/m/Y H:i', strtotime($value->create_date));?></div>
                                <div class="intro"><?php echo $value->intro;?></div>
                            </li>
                        <?php endforeach;?>
                        <?php if (count($result) == 0) :?>
                        <li class="empty">Không tìm thấy nội dung tin tức nào !</li>
                        <?php endif;?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>